﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using FlexCell;
using YArchitech.LIB;

namespace YArchitech.Plumbing
{
	public partial class FormSupplyShowPara : System.Windows.Forms.Form
	{
		public FormSupplyShowPara(string szTitla, int n)
		{
			this.InitializeComponent();
			new YJKProcessTools().ShowInTaskbarChange(this);
			this.Text = szTitla;
			base.CenterToParent();
			string fileName;
			if (n == 1)
			{
				fileName = Path.Combine(Product.DataLocation, "SupplyShowPara-Temp.xml");
				base.Size = new Size(550, 330);
				this.grid1.Size = new Size(540, 255);
				this.button1.Location = new System.Drawing.Point(237, 260);
			}
			else
			{
				fileName = Path.Combine(Product.DataLocation, "SupplyShowPara-A.xml");
				base.Size = new Size(380, 350);
				this.grid1.Size = new Size(370, 275);
				this.button1.Location = new System.Drawing.Point(152, 280);
			}
			this.grid1.LoadFromXML(fileName);
			this.grid1.Row(0).Visible = false;
			this.grid1.Column(0).Visible = false;
			this.grid1.AutoSize = true;
			this.grid1.Locked = true;
			//base.Icon = Resource.YArchitechIcon;
		}

		private void button1_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.OK;
			base.Close();
		}
	}
}
